/**
 * Created by udi on 2016/11/26.
 */
'use strict'


const fs = require("fs");
var path = require('path');
let jv = require("../libs/sys/myHelper").jv;

let mvc = path.normalize(__dirname + "/../mvc");

if (fs.existsSync(mvc)) {
  let files = fs.readdirSync(mvc);

  files.forEach(file => {
    if (!file.endsWith(".js")) return;


    require("../mvc/" + file.slice(0, -3).replace(/\\/g, "/"));
  });

  jv.log("自动加载 mvc/ ：" + files.map(it => {
      return it.slice(0, -3);
    }).join(","));
}

